Skip to content

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented Oct 9, 2024

PostgREST doesn't detect relationships across schemas

PostgREST doesn't detect relationships across schemas
Copy link
Member

@avallete avallete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, maybe we'll want this not only in typescript tough. So maybe some filter at relation fetching level 🤔

Also, I wonder if that make sense for postgres-meta to not handle cross-schemas relations. PostgREST might not handle it, but postgres itself does.

@soedirgo
Copy link
Member Author

soedirgo commented Oct 9, 2024

maybe we'll want this not only in typescript tough. So maybe some filter at relation fetching level

IIRC these are used by the dashboard to detect fkeys across schemas, so we need to keep it as is.

I wonder if that make sense for postgres-meta to not handle cross-schemas relations. PostgREST might not handle it, but postgres itself does.

The typegen is designed with PostgREST use case in mind, although it's not documented as such - we may want to make this explicit at some point though (e.g. rename the route to postgrest-types/typescript)

@soedirgo soedirgo merged commit 2e54f31 into master Oct 9, 2024
4 checks passed
@soedirgo soedirgo deleted the fix/typegen-relationships-across-schemas branch October 9, 2024 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants